import { uniFetch } from './uni-fetch'

/**
 * 消息列表
 */
export const getMessageList = (data) => {
  return uniFetch({
    method: 'GET',
    url: '/driver/messages/page',
    data,
  })
}

/**
 * 全部已读
 */
export const ReadAll = (contentType) => {
  return uniFetch({
    method: 'PUT',
    url: '/driver/messages/readAll/' + contentType,
  })
}

/**
 * 标记已读
 */
export const MarkRead = (id) => {
  return uniFetch({
    method: 'PUT',
    url: '/driver/messages/' + id,
  })
}
